package com.example.module_inspection

import androidx.lifecycle.MutableLiveData
import com.yuwei.base.BaseViewModel
import com.yuwei.http.ApiService
import com.yuwei.http.entity.InspectionEntity
import com.yuwei.http.entity.PatrolEntity
import dagger.hilt.android.lifecycle.HiltViewModel
import javax.inject.Inject
@HiltViewModel
class InspectionViewModel @Inject constructor(
    val apiService: ApiService
):BaseViewModel() {
    val getInspectionSuccess by lazy { MutableLiveData<InspectionEntity>() }
    fun getInspection(){
        executeNetwork({
            apiService.getInspection()
        },getInspectionSuccess::postValue)
    }
    val patrolSuccess by lazy { MutableLiveData<PatrolEntity>() }
    fun getPatrol(){
        executeNetwork({
            apiService.getPatrol()
        },patrolSuccess::postValue)
    }
}